import importlib
import os
from . import config as sysconf

config_path = os.environ.get("PYIM_CONFIG")
if config_path:
    config = importlib.import_module(config_path)
    for key in sysconf.__dict__:
        if not hasattr(config, key):
            setattr(config, key, getattr(sysconf, key))